<?php

$http_tag = "http";
if (!empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off') {
    $http_tag = "https";
}

$host = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : "xier.daguji.net";
define("WEB_DOMAIN", $host);
define("WEB_URL", $http_tag . "://" . WEB_DOMAIN . "/");
define("PUBLIC_URL", $http_tag . "://" . WEB_DOMAIN . "/public");
define("UPFILE_URL", $http_tag . "://" . WEB_DOMAIN . "/upfile");
define("ADMIN_URL", $http_tag . "://" . WEB_DOMAIN . "/?d=admin");
define("LVXINGSHE_URL", $http_tag . "://" . WEB_DOMAIN . "/?d=lvxingshe");
define("HOTEL_URL", $http_tag . "://" . WEB_DOMAIN . "/?d=hotel");

$config = [
    "redis" => [
        "host" => [
            "host" => "127.0.0.1",
            "port" => 6379,
            "username" => "",
            "password" => "",
            "database" => 1,
        ],
        "queue" => [
            "tag" => "prod",
            "is_send_sms" => 1,
        ],
    ],
    "baidu_fanyi" => [
        "appid" => "20250731002420744",//
        "secret" => "U09ZuEORiNOWg1JOS9ox",//
        //"api_url" => "http://api.fanyi.baidu.com/api/trans/vip/translate",
        "api_url" => "https://fanyi-api.baidu.com/api/trans/vip/translate",
    ],
];
